<?php
/**
 * Created by PhpStorm.
 * DateTime: 2020/11/3 14:08
 * Intro:
 */

namespace addons\podunk\validate;


class Device extends Base
{
    /**
     * 验证规则
     */
    protected $rule = [
        'id'   => 'require|isPositiveInteger',
        'name'=> 'require',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require' => '未知错误',
        'name.require' => '请填写分组名',
        'id.isPositiveInteger'=>'未知字符',
    ];

    /**
     * 字段描述
     */
    protected $field = [

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['name'],
        'edit' => ['id','name'],
        'del' => ['id']
    ];
}